package com.zyf.cloud.services.userservice;

import co.elastic.apm.attach.ElasticApmAttacher;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@SpringBootApplication
@MapperScan("com.zyf.cloud.services.userservice.mapper")
@EnableEurekaServer
public class UserApplication {
    public static void main(String[] args) {

        // 重点，调用ElasticApmAttacher.attach();函数
        ElasticApmAttacher.attach();

        System.setProperty("es.set.netty.runtime.available.processors", "false");
        SpringApplication.run(UserApplication.class, args);

    }
}
